package com.bxl.chooser.bean;

/**
 * <>
 *
 * @author baixl
 * @date 2021/3/25
 */
public class ChooseMsg {
    /**
     * 任期
     */
    private int term;
    /**
     * 投票给谁
     */
    private String votedFor;
    /**
     * 当前索引
     */
    private int index;

    private String msg;
    private String messageId;
    private String appId;
    
    private int commitLogIndex;
    
    private String leaderIp;
    private int port;

    public ChooseMsg() {
    }
    public ChooseMsg(int term, String votedFor, int index, String msg, String messageId, String appId, int commitLogIndex) {
        this.term = term;
        this.votedFor = votedFor;
        this.index = index;
        this.msg = msg;
        this.messageId = messageId;
        this.appId = appId;
        this.commitLogIndex = commitLogIndex;
    }

    public int getTerm() {
        return term;
    }

    public void setTerm(int term) {
        this.term = term;
    }

    public String getVotedFor() {
        return votedFor;
    }

    public void setVotedFor(String votedFor) {
        this.votedFor = votedFor;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public int getCommitLogIndex() {
        return commitLogIndex;
    }

    public void setCommitLogIndex(int commitLogIndex) {
        this.commitLogIndex = commitLogIndex;
    }

    public String getLeaderIp() {
        return leaderIp;
    }

    public void setLeaderIp(String leaderIp) {
        this.leaderIp = leaderIp;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
